1. Field of the Invention
An aspect of the invention relates to a method of calibrating an input of a digital-to-analog (D/A) converter based on an output of an analog-to-digital (A/D) converter, and an apparatus employing the method. More particularly, an aspect of the invention relates to a method of calibrating an input of a D/A converter based on an output of an A/D converter to compensate for a functional difference between the A/D converter and the D/A converter in an analog encoding apparatus generating digital encoding signals using the D/A converter, and to the analog encoding apparatus employing the method.
2. Description of the Related Art
Due to rapid growth in automatic control systems, processing of signals output from various sensors to enable accurate control of an object has become important. In general, an analog encoding apparatus is used in image forming apparatuses such as a printer and a copier to generate a digital encoding signal for controlling a motor.
FIG. 1 is a block diagram an analog encoding apparatus of the related art that includes an analog encoder 100, an analog-to-digital (A/D) converter 110, an analog encoder pattern storage unit 120, a digital-to-analog (D/A) converter 130, a comparison unit 140, a current state latch unit 150, a present estimated state determination unit 160, and a Gray code conversion unit 170.
The analog encoder 100 is connected to a shaft of a motor and outputs two quasi-sinusoidal signals having a same period but differing in phase by 90° that go through a predetermined number of complete periods during one rotation of the motor shaft. The A/D converter 110 digitizes the two output signals of the analog encoder 100 at a plurality of sampling points in one complete period of the two output signals to obtain an analog encoder pattern that is stored in the analog encoder pattern storage unit 120. The sampling points correspond to states of the two output signals of the analog encoder 100, and the analog encoder pattern storage unit 120 stores the analog encoder pattern indexed by these states. For example, if there are 8 sampling points, these 8 sampling points respectively correspond to 8 states numbered 0 to 7, or 000 to 111 in binary notation, and the analog encoder pattern storage unit 120 stores the digitized values of the two output signals of the analog encoder 100 as analog encoder pattern values indexed by state values of 000 to 111. Thus, for example, the digitized values of the two output signals sampled at the first sampling point corresponding to the state 0 are stored as two analog encoder pattern values indexed by a state value of 000. The analog encoder pattern storage unit 120 outputs two analog encoder pattern values corresponding to a current state in response to a current state input to the analog encoder pattern storage unit 120 from the current state latch unit 150. Thus, for example, if the current state input from the current state latch unit 150 is the state 0, the analog encoder pattern storage unit 120 outputs the two analog encoder pattern values that are indexed by the state value of 000. The D/A converter 130 converts the two analog encoder pattern values output from the analog encoder pattern storage unit 120 to two analog values. The comparison unit 140 compares the two analog values from the D/A converter 130 with corresponding ones of the two output signals of the analog encoder 100, thereby generating state change information. The present estimated state determination unit 160 determines a present estimated state based on the state change information from the comparison unit 140 and the current state from the current state latch unit 150, and outputs the present estimated state to the current state latch unit 150. The current state latch unit 150 latches the present estimated state from the present estimated state determination unit 160 in synchronism with a reference clock to produce a current state, and outputs the current state to the analog encoder pattern storage unit 120, the present estimated state determination unit 160, and the Gray code conversion unit 170. The Gray code conversion unit 170 converts the current state input from the current state latch 150 into Gray-coded digital encoding signals.
In other words, in the analog encoding apparatus of the related art, a relationship between the analog encoder pattern values obtained from the output signals of the analog encoder 100 by the A/D converter 110 and states of the output signals of the analog encoder 100 is stored in a tabular form. Furthermore, the analog encoder pattern values corresponding to a current state are output in digital form to the D/A converter 130 which converts them to analog signals which are compared to the output signals of the analog encoder 100 by the comparison unit 140.
Therefore, when an analog encoder pattern value obtained in digital form by the A/D converter 110 from an output signal of the analog encoder 100 is converted to an analog signal by the D/A converter 130, a value of the analog signal converted by the D/A converter 130 should equal a value of the output signal of the analog encoder 100 at the time the analog encoder pattern value was obtained. However, when there is a functional difference between the A/D converter 110 and the D/A converter 130, the value of the analog signal converted by the D/A converter 100 is not equal to the value of the output signal of the analog encoder 100, and therefore the comparison unit 140 will produce an incorrect result when it compares the analog signal converted by the D/A converter 130 with the output signal of the analog encoder 100. Accordingly, the accuracy of the digital encoding signals generated by the Gray code conversion unit 170 is decreased.